<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta  charset="utf-8">
        <meta name="keywords" content="" />
        <meta name="description" content="" />
        <title></title>
        <link  href="<?php echo base_url() . 'public/admin/' ?>css.css"  rel="stylesheet">
        <script  type="text/javascript"  src="<?php echo base_url() . 'public' ?>/jquery.min.js"></script>
        <style  type="text/css"></style>
    </head>
    <body style="background:#ccffcc;">
        <h1 style="margin-top: 20px; margin-left: 20px;">你当前的位置:<?php if($flag=='link'){echo '友情链接列表';}else{
            echo '导航链接列表';
        }?></h1>
        <?php if(!empty($_GET['flag2'])){echo '<h3 style="color:red;">删除成功</h3>';}?>
        <table class="gridtable">
            <tr>
                <th>链接名称</th><th>链接地址</th><th>操作</th>
            </tr>
            <?php foreach ($res as $val) { ?>
                <tr>
                    <td><?php echo $val['title']; ?></td>
                    <td><?php
                        echo $val['src'];
                        ?>
                    </td>
                    <td><a href="<?php echo site_url('sa/delLink') ?>?id=<?php echo $val['id']; ?>&flag=<?php echo $val['flag'];?>" onclick="if(!confirm('确定要删除吗')){ return false;}">删除</a> </td>
                </tr>
            <?php } ?>
        </table>
</body></html>
